<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.js"></script>
		<style type="text/css">
			.dialog_window{
				background-color: #FAEBD7;
				height: 200px;
				width: 300px;
				position: absolute;
				top:100px;
				left: 100px;				
			}
			
			.button_close{
				position: absolute;
				bottom: 0px;
				right: 0px;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<h4>单击打开对话框，让对话框显示</h4>
			<button @click="onClickOpenDialog">打开对话框</button>
			
			<div class = "dialog_window" v-show="isShow">
				这里有很多对话框显示的内容，比如产品解释，文本说明
				<button class="button_close" @click="onClickCloseDialog">关闭对话框</button>
			</div>
		</div>
		
		<script type="text/javascript">
			var vm = new Vue({
				el:"#app",
				data:{
					isShow:false,
				},
				methods:{
					onClickOpenDialog(){
						this.isShow = true;
					},
					
					onClickCloseDialog(){
						this.isShow = false;
					}
				}
			})
		</script>
	</body>
</html>
